<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('查看用车记录')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-record-edit" th:object="${tmdCarRecord}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">编号：</label>
            <div class="col-sm-8">
                <input name="id" th:field="*{id}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">申请名称：</label>
            <div class="col-sm-8">
                <input name="context" th:field="*{carUse.context}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">创建人：</label>
            <div class="col-sm-8">
                <input name="createPersonId" th:field="*{createPersonId}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">创建时间：</label>
            <div class="col-sm-8">
                <input name="createTime" th:value="${#dates.format(tmdCarRecord.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" readonly>
            </div>
        </div>
<!--        <div class="form-group">-->
<!--            <label class="col-sm-3 control-label">紧急程度：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <input name="level" th:field="*{carUse.level}" class="form-control" type="text"-->
<!--                       th:with="type=${@dict.getType('level')}" readonly>-->
<!--            </div>-->
<!--        </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">部门：</label>
            <div class="col-sm-8">
                <input name="deptName" th:field="*{sysDept.deptName}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">车牌号：</label>
            <div class="col-sm-8">
                <input name="carCard" th:field="*{carList.carCard}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">车辆名称：</label>
            <div class="col-sm-8">
                <input name="carName" th:field="*{carList.carName}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">开始时间：</label>
            <div class="col-sm-8">
                <input name="startTime" th:value="${#dates.format(tmdCarRecord.carUse.startTime, 'yyyy-MM-dd')}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">结束时间：</label>
            <div class="col-sm-8">
                <input name="endTime" th:value="${#dates.format(tmdCarRecord.carUse.endTime, 'yyyy-MM-dd')}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">始发地：</label>
            <div class="col-sm-8">
                <input name="startPlace" th:field="*{carUse.startPlace}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">目的地：</label>
            <div class="col-sm-8">
                <input name="destPlace" th:field="*{carUse.destPlace}" class="form-control" type="text" readonly>
            </div>
        </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">司机：</label>
                <div class="col-sm-8">
                    <input name="userName" th:field="*{sysUser.userName}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">司机电话：</label>
                <div class="col-sm-8">
                    <input name="phonenumber" th:field="*{sysUser.phonenumber}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">用车事由：</label>
                <div class="col-sm-8">
                    <input name="reason" th:field="*{carUse.reason}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">附件：</label>
                <div class="col-sm-8">
                    <div class="file-loading">
                        <input class="form-control file-upload" id="file" name="carUse.file" th:value="*{carUse.file}" type="text" disabled>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="notes" th:field="*{carUse.notes}" class="form-control" type="text" readonly>
                </div>
            </div>
<!--        <div class="form-group">-->
<!--            <label class="col-sm-3 control-label">操作名称 0：借出，1：归还，2：新增车辆，3：删除车辆，4：编辑车辆：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <input name="operate" th:field="*{operate}" class="form-control" type="text">-->
<!--            </div>-->
<!--        </div>-->
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "car/record";
    $("#form-record-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-record-edit').serialize());
        }
    }
</script>
</body>
</html>